package ru.ys.jsolver.view;

import java.awt.Dimension;

import javax.swing.JTable;

public class MyTable extends JTable {
	int myCellSize = 10;

	
	public MyTable(int i, int j) {
		super(i,j);
	}
	void setCellSize(int i) {
		myCellSize = i;
		setRowHeight(i);
	}
	@Override
	public Dimension getPreferredSize() {
		return (new Dimension((getColumnCount() * myCellSize),
						(getRowCount() * myCellSize)));		
	}
	
	@Override
	public Dimension getMinimumSize() {		
		return getPreferredSize();
	}
	
	@Override
	public Dimension getMaximumSize() {
		return getPreferredSize();
	}
	
}
